
from selenium.webdriver.common.by import By
from pages.base_page import BasePage
class LookPage(BasePage):
    """线索-查看页面类"""
    click_del_locator = (By.CSS_SELECTOR, '#tab1 > div.container2.top-pad > div > a.btn.btn-primary.del_confirm')
    click_edit_locator = (By.CSS_SELECTOR, '#tab1 > div.container2.top-pad > div > a:nth-child(1)')
    def click_del(self):
        """点击删除"""
        self.driver.find_element(*self.click_del_locator).click()

    def click_clue_edit(self):
        """点击修改"""
        self.driver.find_element(*self.click_edit_locator).click()

    def clue_alert(self):
        """弹窗处理"""
        self.driver.switch_to.alert.accept()





